#include "app_message.h"
#include "log/log.h"

int main(int argc, char const *argv[])
{
    char *json = "{\"id\":\"5858\",\"msg\":\"61626364\", \"conn_type\":1}";
    Message *message = app_message_initByJson(json);
    char json2[100];
    app_message_toJson(message, json2, 100);
    log_debug("json2=%s", json2);
    char binary[100];
    int len = app_message_toBinary(message, binary, 100);
    log_debug("binary=%s, len=%d", binary, len);
    Message *message2 = app_message_initByBinary(binary, len);
    
    return 0;
}

